<html>
<head><meta charset="utf-8"><title>TypeVisitor: do not hard-code a `ControlF… compiler-team#383 · t-compiler/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/index.html">t-compiler/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html">TypeVisitor: do not hard-code a `ControlF… compiler-team#383</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215729083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215729083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215729083">(Nov 05 2020 at 15:41)</a>:</h4>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/compiler-team/issues/383">TypeVisitor: do not hard-code a <code>ControlFlow&lt;()&gt;</code> result #383</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>



<a name="215729361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215729361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215729361">(Nov 05 2020 at 15:42)</a>:</h4>
<p>that was fast <span aria-label="laughter tears" class="emoji emoji-1f602" role="img" title="laughter tears">:laughter_tears:</span></p>



<a name="215729400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215729400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215729400">(Nov 05 2020 at 15:43)</a>:</h4>
<p>You think so? <span aria-label="innocent" class="emoji emoji-1f607" role="img" title="innocent">:innocent:</span></p>



<a name="215729447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215729447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215729447">(Nov 05 2020 at 15:43)</a>:</h4>
<p>I'm currently experimeting with it so I thought I'd open an MCP</p>



<a name="215729524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215729524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215729524">(Nov 05 2020 at 15:43)</a>:</h4>
<p>Though it doesn't mean it has to be accepted now, I think?</p>



<a name="215729658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215729658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215729658">(Nov 05 2020 at 15:44)</a>:</h4>
<p>all good <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span> I knew about the plans for this, and I definitely think we should do it</p>



<a name="215731268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215731268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215731268">(Nov 05 2020 at 15:55)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="492">@T-compiler</span>: Proposal <a href="https://github.com/rust-lang/compiler-team/issues/383#issuecomment-722466040">#383</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="215731615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215731615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215731615">(Nov 05 2020 at 15:57)</a>:</h4>
<blockquote>
<p>Introduce a BreakTy associated type in TypeVisitor (which could default to ())</p>
</blockquote>
<p>+1 for dogfooding associated type defaults more</p>



<a name="215731854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215731854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215731854">(Nov 05 2020 at 15:59)</a>:</h4>
<p>huh..so this ends up being like Chalk's <code>VisitResult</code>...</p>



<a name="215731926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215731926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215731926">(Nov 05 2020 at 15:59)</a>:</h4>
<p>So, what are the potential uses of this?</p>



<a name="215731990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215731990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215731990">(Nov 05 2020 at 16:00)</a>:</h4>
<p>See the review of <a href="https://github.com/rust-lang/rust/issues/78182">#78182</a> for examples</p>



<a name="215763468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215763468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215763468">(Nov 05 2020 at 19:38)</a>:</h4>
<p>I didn't see the examples in <a href="https://github.com/rust-lang/rust/issues/78182">#78182</a></p>



<a name="215765896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215765896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215765896">(Nov 05 2020 at 19:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383/near/215763468">said</a>:</p>
<blockquote>
<p>I didn't see the examples in <a href="https://github.com/rust-lang/rust/issues/78182">#78182</a></p>
</blockquote>
<p>Those are:</p>
<ul>
<li><a href="https://github.com/rust-lang/rust/pull/78182#discussion_r509266520">https://github.com/rust-lang/rust/pull/78182#discussion_r509266520</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/78182#discussion_r509272130">https://github.com/rust-lang/rust/pull/78182#discussion_r509272130</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/78182#discussion_r509288076">https://github.com/rust-lang/rust/pull/78182#discussion_r509288076</a></li>
<li><a href="https://github.com/rust-lang/rust/pull/78182#discussion_r509424737">https://github.com/rust-lang/rust/pull/78182#discussion_r509424737</a></li>
</ul>



<a name="215765966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/215765966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Léo Lanteri Thauvin <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#215765966">(Nov 05 2020 at 19:57)</a>:</h4>
<p>I just implemented them in <a href="https://github.com/rust-lang/rust/issues/78779">#78779</a> but CI is failing, I need to investigate</p>



<a name="216801891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/TypeVisitor%3A%20do%20not%20hard-code%20a%20%60ControlF%E2%80%A6%20compiler-team%23383/near/216801891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/TypeVisitor.3A.20do.20not.20hard-code.20a.20.60ControlF.E2.80.A6.20compiler-team.23383.html#216801891">(Nov 15 2020 at 16:50)</a>:</h4>
<p>This proposal has been accepted: <a href="https://github.com/rust-lang/compiler-team/issues/383">#383</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>